package com.zjw.zy.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author ：zhong.jw
 * @date ：Created in 2022/9/27 17:18
 */
public final class Location implements Parcelable {
    //城市码
    public String areaCode;
    //城市中文名
    public String name;
    //所属国家中文名
    public String country;
    //行政区划路径
    public String path;

    protected Location(Parcel in) {
        areaCode = in.readString();
        name = in.readString();
        country = in.readString();
        path = in.readString();
    }

    public static final Creator<Location> CREATOR = new Creator<Location>() {
        @Override
        public Location createFromParcel(Parcel in) {
            return new Location(in);
        }

        @Override
        public Location[] newArray(int size) {
            return new Location[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(areaCode);
        dest.writeString(name);
        dest.writeString(country);
        dest.writeString(path);
    }
}
